package com.rainng.coursesystem.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.rainng.coursesystem.controller.admin.vo.SysGroupReqDTO;
import com.rainng.coursesystem.controller.admin.vo.SysUserQueryReqDTO;
import com.rainng.coursesystem.model.entity.RoleEntity;
import com.rainng.coursesystem.model.entity.UserGroupEntity;
import com.rainng.coursesystem.model.entity.UserRoleEntity;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserGroupMapper extends BaseMapper<UserGroupEntity> {

    IPage<UserGroupEntity> queryGroupPageList(@Param("po") SysGroupReqDTO po, Page<UserGroupEntity> pageParam);

    Integer queryGroupCount(@Param("po") SysGroupReqDTO po);

    List<String> getDepartmentNameByUserName(String name);

    List<String> getDepartmentIdByUserName(String name);

    List<UserGroupEntity> getAllUserGroup();

    String getGroupIdByUserName(String name);

    String getUserIdByRealName(String name);

}
